//
//  JYStatus.m
//  03-微博重做
//
//  Created by 俊怡商 on 15/4/27.
//  Copyright (c) 2015年 Kamael. All rights reserved.
//

#import "JYStatus.h"

@implementation JYStatus
+(instancetype)statusWithDic:(NSDictionary *)dic{
    JYStatus *status = [[self alloc] init];
    [status setValuesForKeysWithDictionary:dic];
    return status;
}

+(NSArray *)statusList{
    NSURL *url = [[NSBundle mainBundle] URLForResource:@"weibo.json" withExtension:nil];
    NSData *data = [NSData dataWithContentsOfURL:url];
    NSArray *arrary = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL];
    NSMutableArray *model = [NSMutableArray array];
    [arrary enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        JYStatus *status = [JYStatus statusWithDic:obj];
        [model addObject:status];
    }];
    return model;
}
@end
